package com.zfast.yugioh.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zfast.forge.valid.Create;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;


/**
 * 卡组
 *
 * @author zgn
 * @email 
 * @date 2022-06-10 15:13:23
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "t_sys_user_card")
@ApiModel(value = "UserCard", description = "卡组")
public class UserCard implements Serializable{
    private static final long serialVersionUID=1L;

    @Id
    @Column(name = "id")
    @ApiModelProperty("主键")
    @NotNull(message = "主键不可为空", groups = {Create.class})
    private Integer id;

    @Column(name = "user_id")
    @ApiModelProperty("用户id")
    @NotNull(message = "用户id不可为空", groups = {Create.class})
    private Integer userId;

    @Column(name = "card_id")
    @ApiModelProperty("卡牌id")
    @NotNull(message = "卡牌id不可为空", groups = {Create.class})
    private Integer cardId;

    @Column(name = "features")
    @ApiModelProperty("特性/一下是独立特性")
    @NotNull(message = "特性/一下是独立特性不可为空", groups = {Create.class})
    private Integer features;

    @Column(name = "rate")
    @ApiModelProperty("登场率")
    @NotNull(message = "登场率不可为空", groups = {Create.class})
    private Integer rate;

    @Column(name = "shape")
    @ApiModelProperty("形态")
    @NotNull(message = "形态不可为空", groups = {Create.class})
    private Integer shape;

    @Column(name = "dialogue")
    @ApiModelProperty("登场对话;分割")
    private String dialogue;

    @Column(name = "effects_features")
    @ApiModelProperty("特性效果")
    private String effectsFeatures;

    @Column(name = "effects_fetters")
    @ApiModelProperty("羁绊效果")
    private String effectsFetters;

    @Column(name = "num")
    @ApiModelProperty("登场次数")
    @NotNull(message = "登场次数不可为空", groups = {Create.class})
    private Integer num;

    @Column(name = "is_deck")
    @ApiModelProperty("卡组中0,不在;1在")
    @NotNull(message = "卡组中0,不在;1在不可为空", groups = {Create.class})
    private Boolean isDeck;

    @Column(name = "enable_flag")
    @ApiModelProperty("删除标志0:无;1有")
    @NotNull(message = "删除标志0:无;1有不可为空", groups = {Create.class})
    private Boolean enableFlag;

    @Transient
    @ApiModelProperty("模糊查询字段")
    private String whe;

    //2022-06-13 15:24:46
    @Column(name = "decks")
    @ApiModelProperty("所属卡组id")
    private String decks;
}
